package com.aurora.app.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.aurora.app.enums.AssessmentType;
import com.aurora.base.entity.BaseEntity;

/**
 * 订单完成后的评价
 * @author yongjiang.lin
 *
 */
@Entity
@Table(name = "tb_assessment")
public class Assessment extends BaseEntity {
	private PayOrder payOrder;
	//评价类型
	private  AssessmentType assessmentType;
	//备注
	private String remark;
	
	@ManyToOne(cascade = {CascadeType.REFRESH}, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "f_pay_id")
	public PayOrder getPayOrder() {
		return payOrder;
	}
	public void setPayOrder(PayOrder payOrder) {
		this.payOrder = payOrder;
	}
	
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "f_assessment_type")
	public AssessmentType getAssessmentType() {
		return assessmentType;
	}
	public void setAssessmentType(AssessmentType assessmentType) {
		this.assessmentType = assessmentType;
	}
	
	@Column(name = "f_remark")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
